async function showAvatar() {
    let response = await fetch('user.json') // 解析 response header
    let user = await response.json(); // 将 body 读取为 json

    let githubResponse = await fetch(`https://api.github.com/users/${user.name}`)
    let githubUser = await githubResponse.json()

    let img = document.createElement('img')
    img.src = githubUser.avatar_url
    img.className = 'promise-avatar-example'
    document.body.append(img)

    await new Promise((resolve, reject) => setTimeout(resolve, 3000))


    img.remove()
    return githubUser
}